layar=savescreen(0,0,24,79)
SELE 3
count to cnt
declare norec[cnt]
declare fild[cnt]

SELE 3
SET EXCLU OFF
USE &DR&F3 INDEX &DR&F3
go top
cr=0
do while .not. eof()
  cr=cr+1
  norec[cr]=recno()
  FILD[CR]=SUPP_CODE+' '+CHR(179)+SUPP_NAME+' '+CHR(179)+SUBS(SUPP_ADD1,1,24)+' '+CHR(179)+SUPP_TEL1
  skip
enddo

CLEAR
DO ADDRESSC
@  6,  5  SAY "CHOICE SUPPLIER"
@ 10,  2  SAY "CODE  NAME                      ADDRESS                    TELEPHONE"
@ 22,  3  SAY "PREVIOUS SCREEN ->> Pg Up    NEXT SCREEN ->> Pg Dn    PREVIOUS MENU ->> Esc"
@  5,  3  TO  7, 21    DOUBLE
@ 11,  2  TO 11, 77
@ 21,  1  TO 23, 29
@ 21, 30  TO 23, 54
@ 21, 55  TO 23, 78
DO WHILE .T.
   inkey()
   cari=achoice(12,2,20,78,fild)
   mix=lastkey()
   DO CASE
      CASE MIX=13
         OKK=.T.
         NOR=NOREC[CARI]
         GOTO NOR
         IF REC_LOCK(0)
            REPL ORDR_N_Y_P WITH .T.
            REPL AEA_COMP WITH FREEP
         ENDIF
         UNLOCK
         SUPPCOD=SUPP_CODE
         SUPPNAM=SUPP_NAME
         restscreen(0,0,24,79,layar)
         RETURN
      CASE MIX=27
         OKK=.F.
         restscreen(0,0,24,79,layar)
         RETURN
      OTHER
         LOOP
   ENDCASE
ENDDO
restscreen(0,0,24,79,layar)
RETURN


